<?php
class helper_money_trans
{
    function usd2cny()
    {
        
        K::http_get($s , 'qq.ip138.com' , '/hl.asp?from=USD&to=CNY&q=100',80,'',10);
        if(!$s)
            return false;
        $s = K_str::gb2utf($s);
        $pos = strpos($s , '<td width=80>当前汇率</td>');
        $s = substr($s , $pos);
        $pos = strpos($s , '<table');
        $s = substr($s , 0 , $pos);
        preg_match_all('/td\>([0-9\.]*)\<\/td/is' , $s , $a);
        return $a[1][1];
    }
}
?>